package com.oos.zone.wechat.ma.config;

import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.message.WxMaMessageRouter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 功能描述：
 *
 * @author 拓金辉
 * @version 1.0
 * @date 2021-08-11 18:13:08
 */
@Configuration
public class WechatMaServiceConfig {

    /**
     * 方法描述：创建 WxMaService
     *
     * @return cn.binarywang.wx.miniapp.api.WxMaService
     *
     * @author 拓金辉
     * @date 2021-08-12 22:35:31
     */
    @Bean
    public WxMaService wxMaService() {
        return new WxMaServiceImpl();
    }

    /**
     * 方法描述：WxMaMessageRouter
     *
     * @return cn.binarywang.wx.miniapp.message.WxMaMessageRouter
     *
     * @author 拓金辉
     * @date 2021-08-13 15:59:17
     */
    @Bean
    public WxMaMessageRouter wxMaMessageRouter() {
        return new WxMaMessageRouter(wxMaService());
    }

}
